﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace com.qbengo.utility.nodepicker
{
    class NodeGraphic
    {
        private int key;  
        private int id;  
        private float x;  //x坐标
        private float y;  //y坐标

        public NodeGraphic(int id,float x,float y)
        {
            this.id = id;
            this.x = x;
            this.y = y;
        }
        public NodeGraphic(int key,int id,float x,float y)
        {
            this.key = key;
            this.id = id;
            this.x = x;
            this.y = y;
        }
        public NodeGraphic(int id, PointF point)
        {
            this.id = id;
            this.x = point.X;
            this.y = point.Y;
        }

        public int Key
        {
            get
            {
                return key;
            }
            set
            {
                key = value;
            }
        }

        public int ID
        {
            get
            {
                return id;
            }
            set
            {
                id = value;
            }
        }

        public float X
        {
            get
            {
                return x;
            }
            set
            {
                x = value;
            }
        }

        public float Y
        {
            get
            {
                return y;
            }
            set
            {
                y = value;
            }
        }

        //public static bool operator ==(Node node1,Node node2)
        //{
        //    if (node1 == null && node2 != null || node1 != null && node2 == null)
        //    {
        //        return false;
        //    }
        //    if (node1.ID == node2.ID && node1.X == node2.X && node1.Y == node2.Y)
        //    {
        //        return true;
        //    }
            
        //    return false;
        //}

        //public static bool operator !=(Node node1, Node node2)
        //{
        //    return !(node1==node2);
        //}
    }
}
